<?php
/**
 * 商品订单验证器
 */

namespace app\common\validate;

class OrderValidate extends Validate
{
    protected $rule = [
            'order_sn|订单编号' => 'require',
    'user_id|用户id' => 'require',
    'order_type|订单类型;0-普通订单;1-秒杀订单;2-拼团订单;3-砍价订单' => 'require',
    'order_source|订单来源;1-小程序;2-h5;3-ios;4-安卓' => 'require',
    'order_status|订单状态;0-待付款;1-待发货;2-待收货;3-已完成;4-已关闭' => 'require',
    'pay_status|支付状态;0-待支付;1-已支付;2-已退款;3-拒绝退款' => 'require',
    'pay_way|1-微信支付  2-支付宝支付 3-余额支付' => 'require',
    'pay_time|支付时间' => 'require',
    'consignee|收货人' => 'require',
    'province|省份' => 'require',
    'city|城市' => 'require',
    'district|县区' => 'require',
    'address|地址' => 'require',
    'mobile|手机' => 'require',
    'delivery_type|配送方式;1-快递发货;2-上门自提;' => 'require',
    'goods_price|订单商品总价' => 'require',
    'order_amount|应付款金额' => 'require',
    'discount_amount|优惠金额' => 'require',
    'integral_amount|积分抵扣金额' => 'require',
    'total_amount|订单总价' => 'require',
    'total_num|订单商品数量' => 'require',
    'shipping_status|发货状态' => 'require',
    'shipping_price|运费' => 'require',
    'shipping_time|最后新发货时间' => 'require',
    'wechat_mini_express_sync|微信小程序发货信息录入' => 'require',
    'wechat_mini_express_sync_time|录入时间' => 'require',
    'transaction_id|第三方平台交易流水号' => 'require',
    'user_remark|用户备注' => 'require',
    'confirm_take_time|确认收货时间' => 'require',
    'cancel_time|订单取消时间' => 'require',
    'refund_status|退款状态：0-未退款；1-部分退款；2-全部退款' => 'require',
    'settle_id|结算id；0-未结算' => 'require',
    'settle_amount|结算金额' => 'require',
    'use_integral|使用的积分' => 'require',
    'refund_amount|退款金额' => 'require',
    'order_remarks|订单备注' => 'require',
    'coupon_list_id|用户优惠券id' => 'require',
    'team_found_id|拼团id' => 'require',
    'team_id|拼团活动id' => 'require',
    'delivery_id|发货单ID' => 'require',
    'attach_values|附带的值(赠送时机，赠送积分成长值什么的)Json格式' => 'require',
    'pickup_code|提货码' => 'require',
    'verification_status|核销状态:0-待核销;1-已核销;' => 'require',
    'selffetch_shop_id|自提门店ID' => 'require',

    ];

    protected $message = [
            'order_sn.require' => '订单编号不能为空',
    'user_id.require' => '用户id不能为空',
    'order_type.require' => '订单类型;0-普通订单;1-秒杀订单;2-拼团订单;3-砍价订单不能为空',
    'order_source.require' => '订单来源;1-小程序;2-h5;3-ios;4-安卓不能为空',
    'order_status.require' => '订单状态;0-待付款;1-待发货;2-待收货;3-已完成;4-已关闭不能为空',
    'pay_status.require' => '支付状态;0-待支付;1-已支付;2-已退款;3-拒绝退款不能为空',
    'pay_way.require' => '1-微信支付  2-支付宝支付 3-余额支付不能为空',
    'pay_time.require' => '支付时间不能为空',
    'consignee.require' => '收货人不能为空',
    'province.require' => '省份不能为空',
    'city.require' => '城市不能为空',
    'district.require' => '县区不能为空',
    'address.require' => '地址不能为空',
    'mobile.require' => '手机不能为空',
    'delivery_type.require' => '配送方式;1-快递发货;2-上门自提;不能为空',
    'goods_price.require' => '订单商品总价不能为空',
    'order_amount.require' => '应付款金额不能为空',
    'discount_amount.require' => '优惠金额不能为空',
    'integral_amount.require' => '积分抵扣金额不能为空',
    'total_amount.require' => '订单总价不能为空',
    'total_num.require' => '订单商品数量不能为空',
    'shipping_status.require' => '发货状态不能为空',
    'shipping_price.require' => '运费不能为空',
    'shipping_time.require' => '最后新发货时间不能为空',
    'wechat_mini_express_sync.require' => '微信小程序发货信息录入不能为空',
    'wechat_mini_express_sync_time.require' => '录入时间不能为空',
    'transaction_id.require' => '第三方平台交易流水号不能为空',
    'user_remark.require' => '用户备注不能为空',
    'confirm_take_time.require' => '确认收货时间不能为空',
    'cancel_time.require' => '订单取消时间不能为空',
    'refund_status.require' => '退款状态：0-未退款；1-部分退款；2-全部退款不能为空',
    'settle_id.require' => '结算id；0-未结算不能为空',
    'settle_amount.require' => '结算金额不能为空',
    'use_integral.require' => '使用的积分不能为空',
    'refund_amount.require' => '退款金额不能为空',
    'order_remarks.require' => '订单备注不能为空',
    'coupon_list_id.require' => '用户优惠券id不能为空',
    'team_found_id.require' => '拼团id不能为空',
    'team_id.require' => '拼团活动id不能为空',
    'delivery_id.require' => '发货单ID不能为空',
    'attach_values.require' => '附带的值(赠送时机，赠送积分成长值什么的)Json格式不能为空',
    'pickup_code.require' => '提货码不能为空',
    'verification_status.require' => '核销状态:0-待核销;1-已核销;不能为空',
    'selffetch_shop_id.require' => '自提门店ID不能为空',

    ];

    protected $scene = [
        'add'  => ['order_sn','user_id','order_type','order_source','order_status','pay_status','pay_way','pay_time','consignee','province','city','district','address','mobile','delivery_type','goods_price','order_amount','discount_amount','integral_amount','total_amount','total_num','shipping_status','shipping_price','shipping_time','wechat_mini_express_sync','wechat_mini_express_sync_time','transaction_id','user_remark','confirm_take_time','cancel_time','refund_status','settle_id','settle_amount','use_integral','refund_amount','order_remarks','coupon_list_id','team_found_id','team_id','delivery_id','attach_values','pickup_code','verification_status','selffetch_shop_id',],
'edit' => ['order_sn','user_id','order_type','order_source','order_status','pay_status','pay_way','pay_time','consignee','province','city','district','address','mobile','delivery_type','goods_price','order_amount','discount_amount','integral_amount','total_amount','total_num','shipping_status','shipping_price','shipping_time','wechat_mini_express_sync','wechat_mini_express_sync_time','transaction_id','user_remark','confirm_take_time','cancel_time','refund_status','settle_id','settle_amount','use_integral','refund_amount','order_remarks','coupon_list_id','team_found_id','team_id','delivery_id','attach_values','pickup_code','verification_status','selffetch_shop_id',],

    ];

    

}
